<div id="viewer-container"></div>
<script>
  CTS.ready(() => {
    let gui = new dat.GUI()
    let viewer = new CTS.Viewer('viewer-container') //初始化场景
    const weatherControl = new CTS.WeatherControl(viewer)
    let skyboxSelect = {
      skyboxId: 0
    }
    let params = ['晴天', '黄昏', '夜晚']
    gui.add(skyboxSelect, "skyboxId").options(params).name('天空盒').onChange(e => { //这是一个下拉列表，state是默认值，列表项通过options设置，params.states为列表数组，e返回所选的列表项。
      switch (e) {
        case '晴天':
          weatherControl.addDefaltSkybox(0)
          break
        case '黄昏':
          weatherControl.addDefaltSkybox(1)
          break
        case '夜晚':
          weatherControl.addDefaltSkybox(2)
          break
      }
    })
  })
</script>
